A Debugging Model for Functional Logic Programs
نویسندگان
چکیده
This paper presents a box-oriented debugging model for the functional logic language ALF. Due to the sophisticated operational semantics of ALF which is based on innermost basic narrowing with simplification, the debugger must reflect the application of the different computation rules during program execution. Hence our debugging model includes not only one box type as in Byrd’s debugging model for logic programs but several different kinds of boxes corresponding to the various computation rules of the functional logic language (narrowing, simplification etc.). Moreover, additional box types are introduced in order to allow skips over (sometimes) uninteresting program parts like proofs of the condition in a conditional equation. Since ALF is a genuine amalgamation of functional and logic languages, our debugging model subsumes operational aspects of both kinds of languages. As a consequence, it can be also used for pure logic languages, pure functional languages with eager evaluation, or functional logic languages with a less sophisticated operational semantics like SLOG or eager BABEL.
منابع مشابه
A Logical Framework for the Algorithmic Debugging of Lazy Functional-Logic Program
Traditional debugging techniques are not well suited for lazy functional programming, because of the diicult-to-predict evaluation order. Therefore, declarative debugging techniques have been proposed, which allow to focus on the intended meaning of programs, abstracting away operational concerns. Similar techniques are known also for logic programming and for combined functional logic language...
متن کاملTheoretical Foundations for the Declarative Debugging of Lazy Functional Logic Programs
The aim of this paper is to provide theoretical foundations for the declarative debugging of wrong answers in lazy functional logic programming. We rely on a logical framework which formalizes both the intended meaning and the execution model of programs in a simple language which combines the expressivity of pure Prolog and a signi cant subset of Haskell. As novelties w.r.t. to previous relate...
متن کاملDeclarative Debugging of Functional Logic Programs
We present a general framework for the declarative debugging of functional logic programs, which is valid both for eager as well as lazy programs. We associate with our programs a semantics based on a (continuous) immediate consequence operator which models computed answers. Then we show that, given the intended speciication of a program P, it is possible to check the correctness of P by a sing...
متن کاملA Debugging Model for Lazy Functional Logic Languages
In this paper we present a debugging model for a lazy functional logic programming language whose semantics is based on lazy narrowing under a particular strategy 1 : Demand Driven Strategy (dds). The sophisticated operational semantics under dds-in computing head normal forms for total functions applications-makes necessary to develop a good debugging model which reeects the computational beha...
متن کاملDeclarative Debugging of Lazy Functional Programs
We show how declarative (or algorithmic) debugging can be applied to lazy functional programming and describe a prototype implementation. We rst present a declarative debugger for logic programs which relies on three primitives that determine if an atom is valid in the intended interpretation, return the successful clause instance used by a call and return single atoms from a conjunction of ato...
متن کامل